{extend name="public/layout" /}
{block name="head_css"}
    <link rel="stylesheet" href="/static/home/css/list.css?v={$version}">
    <link rel="stylesheet" href="/static/home/css/index.css?v={$version}">
{/block}

{block name="main"}
    <!-- 滚动图 -->
    {include file='public/index_carousel'/}
    <!-- 滚动图 END -->

    <!-- 工程信息 -->
    <div class="content-area">
        <div class="title-line inline-box">
            <div class="name inline-block">工程信息</div>
            <div class="more inline-block">
                <a target="_blank" href="{:url('engineering/index')}">更多&gt;&gt;&gt;</a>
            </div>
        </div>

        <div class="project-box">
            <div class="title-block">
                今天已有<span>{$today}</span>为用户发布了工程安装信息
                <a target="_blank" href="{:url('engineering/add')}" class="publish-btn">我也要发布</a>
            </div>
            <div class="content-block inline-box">
                <div class="item-block inline-block">
                    {foreach name="e_left" item="item"}
                        <div class="line inline-box"  onclick="to_url('{:url('engineering/detail',array('id'=>$item.id))}')">
                            <div class="phone inline-block">{$item.mobile}</div>
                            <div class="title inline-block">{$item.title}</div>
                            <div class="date inline-block">{$item.update_time}</div>
                        </div>
                    {/foreach}
                </div>
                <div class="item-block inline-block">
                    {foreach name="e_right" item="item"}
                        <div class="line inline-box" onclick="to_url('{:url('engineering/detail',array('id'=>$item.id))}')">
                            <div class="phone inline-block">{$item.mobile}</div>
                            <div class="title inline-block">{$item.title}</div>
                            <div class="date inline-block">{$item.update_time}</div>
                        </div>
                    {/foreach}
                </div>
            </div>
        </div>
    </div>
    <!-- 工程信息 END -->

    {foreach name="module" key="key" item="module_value"}
        <div class="content-area">
            <div class="title-line inline-box">
                <div class="name inline-block">{$module_value.module_name}</div>
                <div class="more inline-block">
                    <a target="_blank" href="{:url($key.'/index')}">更多&gt;&gt;&gt;</a>
                </div>
            </div>

            <div class="wrap-block inline-box">
                {foreach name="module_value.list" key='item_key' item="item"}
                    <div onclick="to_url('{:url($key.'/detail',array('id'=>$item.id))}')"  class="com-item-wrap inline-block">
                        <div class="com-item">
                            <div class="shotcut" style="background-image: url('{$item.img}');">
                                <div class="like">
                                    <div class="content">
                                        <div class="icon"></div>
                                        <div class="words">{$item.like_num}个赞</div>
                                    </div>
                                </div>
                            </div>
                            <div class="info">
                                <div class="logo" style="background-image: url('{$item.logo}');"></div>
                                <div class="name">{$item.contacts}</div>
                                <div class="commend inline-box">
                                    <div class="icon inline-block"></div>
                                    <div class="words inline-block">{$item.comment_num}条评论</div>
                                </div>
                                <div class="phone">
                                    联系电话：{$item.mobile}
                                </div>
                            </div>
                        </div>
                    </div>
                {/foreach}
            </div>

            <a target="_blank" href="{:url($key.'/add')}" class="com-btn">我也要发布</a>
        </div>
        <!-- 声学设计 END -->
    {/foreach}


    <!-- 声学专家 -->
    <div class="content-area">
        <div class="title-line inline-box">
            <div class="name inline-block">声学专家</div>
            <div class="more inline-block">
                <a target="_blank" href="{:url('profession/index')}">更多&gt;&gt;&gt;</a>
            </div>
        </div>

        <div class="wrap-block inline-box">
            {foreach name="profession" item="item"}
                <div  onmouseout="hide_detail(this)" onmousemove="show_detail(this)" onclick="to_url('{:url('profession/detail',array('id'=>$item.id))}')" class="person-item-wrap inline-block" style="position: relative">
                    <div class="mask">
                        <p>{$item.detail}</p>
                    </div>
                    <div class="person-item">
                        <div class="shotcut" style="background-image: url('{$item.img}');"></div>
                        <div class="info">
                            <div class="name">{$item.contacts}</div>
                            <div class="commend inline-box">
                                <div onclick="" class="icon like inline-block"></div>
                                <div class="words first inline-block">{$item.like_num}个赞</div>
                                <div class="icon pinglun inline-block"></div>
                                <div class="words inline-block">{$item.comment_num}条评论</div>
                            </div>
                            <div class="phone">
                                联系电话：{$item.mobile}
                            </div>
                        </div>
                    </div>
                </div>
            {/foreach}
        </div>

        <a target="_blank" href="{:url('profession/add')}" class="com-btn">我也是专家</a>
    </div>
    <!-- 声学专家 END -->

    <!-- 隔音方案 -->
    <div class="content-area">
        <div class="title-line inline-box">
            <div class="name inline-block">隔音方案</div>
            <div class="more inline-block">
                <a target="_blank" href="{:url('program/index')}">更多&gt;&gt;&gt;</a>
            </div>
        </div>

        <div class="wrap-block inline-box">
            {foreach name="program" item="item"}
                <div  style="cursor: pointer" onclick="to_url('{:url('program/detail',array('id'=>$item.id))}')"  class="content-list inline-box">
                    <div class="cleft inline-block" style="width: 100%;margin-right: 0px">
                        <div class="inline-block" style="width: 70%">
                            <div class="top-line inline-box" >
                                <div class="title">{$item.title}</div>
                                <div class="oinfo" style="margin-left: 0px;display: block;">
                                    <div class="icon timing inline-block"></div>
                                    <div class="date inline-block">{$item.update_time}</div>
                                </div>
                            </div>
                        </div>
                        <div class="top-line inline-box" style="width:20%;float: right;text-align: right">
                            <div class="oinfo inline-box">
                                <div class="icon reading inline-block"></div>
                                <div class="date inline-block">{$item.pv}次浏览</div>
                            </div>
                        </div>
                    </div>
                </div>
            {/foreach}
        </div>

        <a target="_blank" href="{:url('program/add')}" class="com-btn">我有更好的方案</a>
    </div>
    <!-- 隔音方案 END -->

    <!-- 秀图 -->
    <div class="content-area">
        <div class="title-line inline-box">
            <div class="name inline-block">秀图</div>
            <div class="more inline-block">
                <a target="_blank" href="{:url('pic/index')}">更多&gt;&gt;&gt;</a>
            </div>
        </div>

        <div class="wrap-block inline-box">
            <div onclick="to_url('{:url('pic/detail',array('id'=>$pic_first.id))}')" class="big-shotcut inline-block" style="background-image: url('{$pic_first.img}');">
                <div class="btm-box inline-box">
                    <div class="icon like inline-block"></div>
                    <div class="words first inline-block">{$pic_first.like_num}个赞</div>
                    <div class="icon pinglun inline-block"></div>
                    <div class="words inline-block">{$pic_first.comment_num}条评论</div>
                </div>
            </div>
            <div class="others-box inline-block inline-box">
                {foreach name="pic" key="key" item="item"}
                    <div onclick="to_url('{:url('pic/detail',array('id'=>$item.id))}')"  class="others-item inline-block" style="background-image: url('{$item.img}');"></div>
                {/foreach}
            </div>
        </div>

        <a target="_blank" href="{:url('pic/add')}" class="com-btn">我也要秀图</a>
    </div>
    <!-- 秀图 END -->

    <!-- 小视频 -->
    <div class="content-area">
        <div class="title-line inline-box">
            <div class="name inline-block">小视频</div>
            <div class="more inline-block">
                <a target="_blank" href="{:url('video/index')}">更多&gt;&gt;&gt;</a>
            </div>
        </div>
        <div class="wrap-block inline-box">
            <div onclick="to_url('{:url('video/detail',array('id'=>$video_first.id))}')"  class="big-shotcut inline-block video" style="background-image: url('{$video_first.img}');">
                <div class="btm-box inline-box">
                    <div class="icon like inline-block"></div>
                    <div class="words first inline-block">{$video_first.like_num}个赞</div>
                    <div class="icon pinglun inline-block"></div>
                    <div class="words inline-block">{$video_first.comment_num}条评论</div>
                </div>
                <div class="play-btn"></div>
            </div>
            <div class="others-box inline-block inline-box">
                {foreach name="video" key="key" item="item"}
                    <div onclick="to_url('{:url('video/detail',array('id'=>$item.id))}')"  class="others-item inline-block" style="background-image: url('{$item.img}');">
                        <div class="play-btn"></div>
                    </div>
                {/foreach}
            </div>

            <a target="_blank" href="{:url('video/add')}" class="com-btn">发布小视频</a>
        </div>
    </div>
    <!-- 小视频 END -->
{/block}
{block name="script"}
    <script>
        function to_url(url){
            window.open(url);
        }
        function show_detail(obj)
        {
            $(obj).find('.mask').each(function(){
                $(this).css('display','block');
            })
        }
        function hide_detail(obj)
        {
            $(obj).find('.mask').each(function(){
                $(this).css('display','none');
            })
        }
    </script>
{/block}